﻿@{
    var events = Html.GetLatestEvents(3);
}
<div class="uritused">
	<div class="sidebar-title-top">
		<div class="sidebar-title">
			<h3><a href="@Url.Content("~/events/")">@Resources.EnetaMvc.Events</a></h3>
		</div>
	</div>
	<div class="uritused-txt">
        @if(events.Count > 0)
        {
		<ul>
            @foreach(var evt in events)
            {
			<li>
				<div class="date-box">
					<div class="month"> <span>@evt.StartDate.ToString("MMM")</span> </div>
					<div class="date-top">
						<div class="date"> <strong>@evt.StartDate.Day</strong> </div>
					</div>
				</div>
				<div class="info">
					<h5><a href="@Url.Content("~/events/details/" + evt.Id)">@evt.Title</a></h5>
					<ul>
						@Html.DisplayDateRange(evt.StartDate, evt.EndDate)
						<li>@evt.VenueName</li>
					</ul>
					<p>@evt.Abstract</p>
				</div>
			</li>
            }
		</ul>
        }
        else 
        {
            <p style="text-align:center">@Resources.EnetaMvc.NoNewEventsComing</p>
        }
	</div>
	<span class="sidebar-box-bottom">&nbsp;</span> 
</div>
